package com.centaline.androidsalesblog.api;

import com.centaline.androidsalesblog.BuildConfig;
import com.centaline.androidsalesblog.base.BaseApi;
import com.centaline.androidsalesblog.constants.AppNameType;
import com.centaline.androidsalesblog.constants.SourceType;
import com.centaline.androidsalesblog.constants.UrlConstant;
import com.centanet.framework.interfaces.IResponseListener;

/**
 * 用户中心api
 * Created by guilin on 15/12/15.
 */
public abstract class UserCenterApi<T> extends BaseApi<T> {

    protected AppNameType appNameType;
    protected SourceType sourceType;

    public UserCenterApi(Class<?> tag, Class<T> aClass, IResponseListener<T> iResponseListener) {
        super(tag, aClass, iResponseListener);
    }

    public void setAppNameType(AppNameType appNameType) {
        this.appNameType = appNameType;
    }

    public void setSourceType(SourceType sourceType) {
        this.sourceType = sourceType;
    }

    @Override
    protected String getIp() {
        return BuildConfig.DEBUG ? UrlConstant.URL_USER_ALPHA : UrlConstant.URL_USER_RELEASE;
    }
}
